Sorting notes alphabetically now sort starting numbers in titles right#2910
Sorting notes alphabetically now sort starting numbers in titles right#2910Rokt33r merged 4 commits intoBoostIO:masterfrom
Conversation
… starting at all titles and compare these.
browser/main/NoteList/index.js
Outdated
| const floatA = parseFloat(matchA[1]) | ||
| const floatB = parseFloat(matchB[1]) | ||
|
|
||
| if (floatA < floatB) { |
There was a problem hiding this comment.
Rather than using if statement, return floatA - floatB should be enough.
|
@dredav I've submitted a change request. I'll merge this as soon as you resolve it. |
…he sub value when not.
Thanks for your review @Rokt33r. I've removed the |
|
@Rokt33r What do you think?
|
Description
Sorting titles with numbers tries to match float values of left and right titles at comparison. When both numbers are floats and not equal we can do a direct compare. In all other cases the full title will compare.
Screenshot before
Screenshot after
Issue fixed
#2894
Type of changes
Checklist: